//
// Created by 21577 on 2025/3/6.
//
#include<stdio.h>
#include<string.h>

int main() {
    char z[8];
    char y[8];
    scanf("%s %s", z, y);
    if(strcmp(z,y)==0)
        printf("zy");
    if((strcmp(z,"jiandao") == 0 && strcmp(y,"bu") == 0) ||
    (strcmp(z,"shitou") == 0 && strcmp(y,"jiandao")==0) ||
    (strcmp(z,"bu") == 0 && strcmp(y,"shitou")==0))
        printf("z");
    if((strcmp(y,"jiandao") == 0 && strcmp(z,"bu") == 0) ||
       (strcmp(y,"shitou") == 0 && strcmp(z,"jiandao")==0) ||
       (strcmp(y,"bu") == 0 && strcmp(z,"shitou")==0))
        printf("z");
    return 0;
}